/**
 * Copyright (c) 2000-2012 Liferay, Inc. All rights reserved.
 *
 * This library is free software; you can redistribute it and/or modify it under
 * the terms of the GNU Lesser General Public License as published by the Free
 * Software Foundation; either version 2.1 of the License, or (at your option)
 * any later version.
 *
 * This library is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
 * details.
 */

package com.spreedairy.portal.model;

import java.io.Serializable;

import java.util.ArrayList;
import java.util.List;

/**
 * This class is used by SOAP remote services.
 *
 * @author    SpreeDairy
 * @generated
 */
public class CustomFieldSoap implements Serializable {
	public static CustomFieldSoap toSoapModel(CustomField model) {
		CustomFieldSoap soapModel = new CustomFieldSoap();

		soapModel.setRecId(model.getRecId());
		soapModel.setCategoryId(model.getCategoryId());
		soapModel.setKeyValue(model.getKeyValue());
		soapModel.setKeyType(model.getKeyType());
		soapModel.setOptional(model.getOptional());
		soapModel.setOptionsValue(model.getOptionsValue());
		soapModel.setFieldOrder(model.getFieldOrder());

		return soapModel;
	}

	public static CustomFieldSoap[] toSoapModels(CustomField[] models) {
		CustomFieldSoap[] soapModels = new CustomFieldSoap[models.length];

		for (int i = 0; i < models.length; i++) {
			soapModels[i] = toSoapModel(models[i]);
		}

		return soapModels;
	}

	public static CustomFieldSoap[][] toSoapModels(CustomField[][] models) {
		CustomFieldSoap[][] soapModels = null;

		if (models.length > 0) {
			soapModels = new CustomFieldSoap[models.length][models[0].length];
		}
		else {
			soapModels = new CustomFieldSoap[0][0];
		}

		for (int i = 0; i < models.length; i++) {
			soapModels[i] = toSoapModels(models[i]);
		}

		return soapModels;
	}

	public static CustomFieldSoap[] toSoapModels(List<CustomField> models) {
		List<CustomFieldSoap> soapModels = new ArrayList<CustomFieldSoap>(models.size());

		for (CustomField model : models) {
			soapModels.add(toSoapModel(model));
		}

		return soapModels.toArray(new CustomFieldSoap[soapModels.size()]);
	}

	public CustomFieldSoap() {
	}

	public long getPrimaryKey() {
		return _recId;
	}

	public void setPrimaryKey(long pk) {
		setRecId(pk);
	}

	public long getRecId() {
		return _recId;
	}

	public void setRecId(long recId) {
		_recId = recId;
	}

	public long getCategoryId() {
		return _categoryId;
	}

	public void setCategoryId(long categoryId) {
		_categoryId = categoryId;
	}

	public String getKeyValue() {
		return _keyValue;
	}

	public void setKeyValue(String keyValue) {
		_keyValue = keyValue;
	}

	public String getKeyType() {
		return _keyType;
	}

	public void setKeyType(String keyType) {
		_keyType = keyType;
	}

	public boolean getOptional() {
		return _optional;
	}

	public boolean isOptional() {
		return _optional;
	}

	public void setOptional(boolean optional) {
		_optional = optional;
	}

	public String getOptionsValue() {
		return _optionsValue;
	}

	public void setOptionsValue(String optionsValue) {
		_optionsValue = optionsValue;
	}

	public int getFieldOrder() {
		return _fieldOrder;
	}

	public void setFieldOrder(int fieldOrder) {
		_fieldOrder = fieldOrder;
	}

	private long _recId;
	private long _categoryId;
	private String _keyValue;
	private String _keyType;
	private boolean _optional;
	private String _optionsValue;
	private int _fieldOrder;
}